package com.myh.gulimall.product.web;

import com.myh.gulimall.product.service.SkuInfoService;
import com.myh.gulimall.product.vo.SkuItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Description: // 类说明，在创建类时要填写
 * @ClassName: ItemController    // 类名，会自动填充
 * @Author: MYH          // 创建者
 * @Date: 2024/5/27 11:12   // 时间
 * @Version: 1.0     // 版本
 */
@Controller
public class ItemController {

    @Autowired
    private SkuInfoService skuInfoService;

    @Autowired
    private ThreadPoolExecutor threadPool;

    @RequestMapping("/{skuId}.html")
    public String skuItem(@PathVariable("skuId") Long skuId) {
        System.out.println("准备查询" + skuId + "详情");
        SkuItemVo vo = skuInfoService.item(skuId);
        return "item";
    }
}
